using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using ns6;

namespace ns7
{
	// Token: 0x02000057 RID: 87
	internal static class Class37
	{
		// Token: 0x060002D7 RID: 727
		[DllImport("iphlpapi.dll", CharSet = CharSet.Ansi)]
		public static extern int GetAdaptersInfo(IntPtr intptr_0, ref long long_0);

		// Token: 0x060002D8 RID: 728 RVA: 0x00004481 File Offset: 0x00002681
		internal static IEnumerable<Class37.Struct5> smethod_0()
		{
			long value = (long)Marshal.SizeOf(typeof(Class37.Struct5));
			IntPtr intPtr = Marshal.AllocHGlobal(new IntPtr(value));
			int adaptersInfo = Class37.GetAdaptersInfo(intPtr, ref value);
			if (adaptersInfo == 111)
			{
				intPtr = Marshal.ReAllocHGlobal(intPtr, new IntPtr(value));
				adaptersInfo = Class37.GetAdaptersInfo(intPtr, ref value);
			}
			if (adaptersInfo == 0)
			{
				IntPtr intPtr2 = intPtr;
				do
				{
					Class37.Struct5 @struct = (Class37.Struct5)Marshal.PtrToStructure(intPtr2, typeof(Class37.Struct5));
					yield return @struct;
					intPtr2 = @struct.intptr_0;
					@struct = default(Class37.Struct5);
				}
				while (intPtr2 != IntPtr.Zero);
				Marshal.FreeHGlobal(intPtr);
			}
			else
			{
				Marshal.FreeHGlobal(intPtr);
			}
			yield break;
		}

		// Token: 0x040001B9 RID: 441
		private const int int_0 = 128;

		// Token: 0x040001BA RID: 442
		private const int int_1 = 111;

		// Token: 0x040001BB RID: 443
		private const int int_2 = 256;

		// Token: 0x040001BC RID: 444
		private const int int_3 = 8;

		// Token: 0x02000058 RID: 88
		public struct Struct5
		{
			// Token: 0x040001BD RID: 445
			public IntPtr intptr_0;

			// Token: 0x040001BE RID: 446
			public int int_0;

			// Token: 0x040001BF RID: 447
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
			public string string_0;

			// Token: 0x040001C0 RID: 448
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
			public string string_1;

			// Token: 0x040001C1 RID: 449
			public uint uint_0;

			// Token: 0x040001C2 RID: 450
			[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
			public byte[] byte_0;

			// Token: 0x040001C3 RID: 451
			public int int_1;

			// Token: 0x040001C4 RID: 452
			public Enum3 enum3_0;

			// Token: 0x040001C5 RID: 453
			public uint uint_1;

			// Token: 0x040001C6 RID: 454
			public IntPtr intptr_1;

			// Token: 0x040001C7 RID: 455
			public Class37.Struct7 struct7_0;

			// Token: 0x040001C8 RID: 456
			public Class37.Struct7 struct7_1;

			// Token: 0x040001C9 RID: 457
			public Class37.Struct7 struct7_2;

			// Token: 0x040001CA RID: 458
			public bool bool_0;

			// Token: 0x040001CB RID: 459
			public Class37.Struct7 struct7_3;

			// Token: 0x040001CC RID: 460
			public Class37.Struct7 struct7_4;

			// Token: 0x040001CD RID: 461
			public int int_2;

			// Token: 0x040001CE RID: 462
			public int int_3;
		}

		// Token: 0x02000059 RID: 89
		public struct Struct6
		{
			// Token: 0x040001CF RID: 463
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
			public string string_0;
		}

		// Token: 0x0200005A RID: 90
		public struct Struct7
		{
			// Token: 0x040001D0 RID: 464
			public IntPtr intptr_0;

			// Token: 0x040001D1 RID: 465
			public Class37.Struct6 struct6_0;

			// Token: 0x040001D2 RID: 466
			public Class37.Struct6 struct6_1;

			// Token: 0x040001D3 RID: 467
			public int int_0;
		}
	}
}
